﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpWebSocket.Routing
{
    public class Route
    {
        public string HostUrlExpression
        {
            get;
            protected set;
        }

        public Type Type
        {
            get;
            protected set;
        }

        public Route( string hostUrlExpression, Type type )
        {
            if ( type == null || !type.IsSubclassOf( typeof( WebSocketHandler ) ))
            {
                throw new ArgumentOutOfRangeException( "type" );
            }

            HostUrlExpression = hostUrlExpression;
            Type = type;
        }
    }
}
